
<template>
    <Account>
        <template v-slot:header>
            <NavBar :title="$t('account.inviteFriends')"/>
        </template>
        <div class="invite">
            <div class="l-f l-row-c">
                <img class="invite_img" src="@/assets/images/gift.svg" />
            </div>
            <p class="invite_title">{{$t('account.referEarn')}}</p>
            <p class="invite_desc">{{$t('account.inviteDesc')}}</p>
            <div class="invite_link">https://app.goldpro.cc/?code=SOKLV0</div>
            <a-button @click="onCopy" type="primary" class="invite_btn">{{$t('account.inviteFriends')}}</a-button>
        </div>
    </Account>
</template>

<script setup>
import Account from '@/views/account/index.vue'
import NavBar from '@/components/navBar/index.vue'
import { useI18n } from 'vue-i18n'
import { message } from 'ant-design-vue';

const { t } = useI18n()

const onCopy = async() => {
     await navigator.clipboard.writeText('http://www.baidu.com')
    message.success(t('account.copySuccess'))
  }

</script>

<style lang="scss" scoped>
@import url("./index.scss");
</style>